﻿Imports System.ComponentModel

<Serializable()> _
Public Class ItemBotao


    <Category("Dados do Botão"), _
    DefaultValue(GetType(String), ""), _
    DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
    Public Property Titulo() As String
        Get
            Return strTitulo
        End Get
        Set(ByVal Value As String)
            strTitulo = Value
        End Set
    End Property

    <Category("Dados do Botão"), _
    DefaultValue(GetType(String), ""), _
    DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
    Public Property Comando() As String
        Get
            Return strComando
        End Get
        Set(ByVal Value As String)
            strComando = Value
        End Set
    End Property

    <Category("Comportamento"), _
    DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
    Public Property Visivel() As Boolean
        Get
            Return bolVisivel
        End Get
        Set(ByVal Value As Boolean)
            bolVisivel = Value
        End Set
    End Property

    <Category("Comportamento"), _
    DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
    Public Property HabilitarEmAlteracao() As Boolean
        Get
            Return bolHabilitarEmAlteracao
        End Get
        Set(ByVal Value As Boolean)
            bolHabilitarEmAlteracao = Value
        End Set
    End Property



    <Category("Comportamento"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
Public Property HabilitarEmInsercao() As Boolean
        Get
            Return bolHabilitarEmInsercao
        End Get
        Set(ByVal Value As Boolean)
            bolHabilitarEmInsercao = Value
        End Set
    End Property


    <Category("Comportamento"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
Public Property HabilitarEmConsulta() As Boolean
        Get
            Return bolHabilitarEmConsulta
        End Get
        Set(ByVal Value As Boolean)
            bolHabilitarEmConsulta = Value
        End Set
    End Property

    <Category("Comportamento"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Visible)> _
Public Property HabilitarSomenteQuandoObjetoBaseCarregado() As Boolean
        Get
            Return bolHabilitarSomenteQuandoObjetoBaseCarregado
        End Get
        Set(ByVal Value As Boolean)
            bolHabilitarSomenteQuandoObjetoBaseCarregado = Value
        End Set
    End Property


    Private bolVisivel As Boolean
    Private strComando As String
    Private strTitulo As String
    Private bolHabilitarEmAlteracao As Boolean
    Private bolHabilitarEmInsercao As Boolean
    Private bolHabilitarEmConsulta As Boolean
    Private bolHabilitarSomenteQuandoObjetoBaseCarregado As Boolean


    Public Sub New()
        bolVisivel = True
        strComando = ""
        strTitulo = ""
        bolHabilitarEmAlteracao = True
        '        bolHabilitarEmInsercao = False
        bolHabilitarEmConsulta = True
        '        bolHabilitarSomenteQuandoObjetoBaseCarregado = False
    End Sub


End Class
